package offer.secnod;

public class Offer14 {

    int  max(int m){
        int[] dp = new int[m + 1];

        dp[1]=1;

        for (int i = 2; i <=m ; i++) {
            for (int j = 1; j <i ; j++) {

                dp[i]=Math.max(Math.max(j*(i-j),j*dp[i-j]),dp[i]);




            }

        }

return  dp[m];
    }
}
